#include "QY_BMS_Data.h"
#include "equ_include/selffun.h"
//请自行添加所需头文件
 QY_BMS_Data_INFO QY_BMS_Data_info;
 QY_BMS_Data_MA QY_BMS_Data_ma;
 QStandardItemModel QY_BMS_Data_mode_info;
void QY_BMS_Data::EQ_0x1801DAB1(quint8 data[]) 
{
QY_BMS_Data_info.V_F1=selffun::com_2uint8(data[1],data[0])-5000;
QY_BMS_Data_info.V_F2=selffun::com_2uint8(data[3],data[2])-5000;
QY_BMS_Data_info.V_F3=selffun::com_2uint8(data[5],data[4])-5000;
QY_BMS_Data_info.V_F4=selffun::com_2uint8(data[7],data[6])-5000;
    QY_BMS_Data_info.CAN_count_0x1801DAB1=0;
    //EQname::Fault_processing();
}
void QY_BMS_Data::EQ_0x1802DAB1(quint8 data[]) 
{
    QY_BMS_Data_info.V_F5=selffun::com_2uint8(data[1],data[0])-5000;
    QY_BMS_Data_info.V_F6=selffun::com_2uint8(data[3],data[2])-5000;
    QY_BMS_Data_info.V_F7=selffun::com_2uint8(data[5],data[4])-5000;
    QY_BMS_Data_info.V_F8=selffun::com_2uint8(data[7],data[6])-5000;
    QY_BMS_Data_info.CAN_count_0x1802DAB1=0;
    //EQname::Fault_processing();
}
void QY_BMS_Data::EQ_0x1803DAB1(quint8 data[]) 
{
    QY_BMS_Data_info.V_F9=selffun::com_2uint8(data[1],data[0])-5000;
    QY_BMS_Data_info.V_F10=selffun::com_2uint8(data[3],data[2])-5000;
    QY_BMS_Data_info.V_F11=selffun::com_2uint8(data[5],data[4])-5000;
    QY_BMS_Data_info.V_F12=selffun::com_2uint8(data[7],data[6])-5000;
    QY_BMS_Data_info.CAN_count_0x1803DAB1=0;
    //EQname::Fault_processing();
}
void QY_BMS_Data::EQ_0x1804DAB1(quint8 data[]) 
{
    QY_BMS_Data_info.V_F13=selffun::com_2uint8(data[1],data[0])-5000;
    QY_BMS_Data_info.V_F14=selffun::com_2uint8(data[3],data[2])-5000;
    QY_BMS_Data_info.V_F15=selffun::com_2uint8(data[5],data[4])-5000;
    QY_BMS_Data_info.V_F16=selffun::com_2uint8(data[7],data[6])-5000;
    QY_BMS_Data_info.CAN_count_0x1804DAB1=0;
    //EQname::Fault_processing();
}
void QY_BMS_Data::EQ_0x1805DAB1(quint8 data[]) 
{
    QY_BMS_Data_info.V_F17=selffun::com_2uint8(data[1],data[0])-5000;
    QY_BMS_Data_info.V_F18=selffun::com_2uint8(data[3],data[2])-5000;
    QY_BMS_Data_info.AD_V=selffun::com_2uint8(data[5],data[4]);
    QY_BMS_Data_info.Power_V1=selffun::com_2uint8(data[7],data[6])*0.01;
    QY_BMS_Data_info.CAN_count_0x1805DAB1=0;
    //EQname::Fault_processing();
}
void QY_BMS_Data::EQ_0x1806DAB1(quint8 data[]) 
{
    QY_BMS_Data_info.PCB_TEMP=data[0]-40;
    QY_BMS_Data_info.Channel_NUB=data[1];
    QY_BMS_Data_info.OC_EN=selffun::TakeOut_bit(data[2],0);
    QY_BMS_Data_info.DO_OC=selffun::TakeOut_bit(data[2],1);
    QY_BMS_Data_info.Alarm_TEMP1_Hi=selffun::TakeOut_bit(data[4],0);
    QY_BMS_Data_info.Alarm_TEMP1_Li=selffun::TakeOut_bit(data[4],1);
    QY_BMS_Data_info.Alarm_TEMP2_Hi=selffun::TakeOut_bit(data[4],2);
    QY_BMS_Data_info.Alarm_TEMP2_Li=selffun::TakeOut_bit(data[4],3);
    QY_BMS_Data_info.Alarm_BMS_A_Hi=selffun::TakeOut_bit(data[4],4);
    QY_BMS_Data_info.Alarm_BMS_A_Li=selffun::TakeOut_bit(data[4],5);
    QY_BMS_Data_info.Alarm_V_F_Hi=selffun::TakeOut_bit(data[4],6);
    QY_BMS_Data_info.Alarm_V_F_Li=selffun::TakeOut_bit(data[4],7);
    QY_BMS_Data_info.Alarm_V_SUM_Hi=selffun::TakeOut_bit(data[5],0);
    QY_BMS_Data_info.Alarm_V_SUM_Li=selffun::TakeOut_bit(data[5],1);
    QY_BMS_Data_info.Power_V1_ERR=selffun::TakeOut_bit(data[6],0);
    QY_BMS_Data_info.Power_3V_ERR=selffun::TakeOut_bit(data[6],1);
    QY_BMS_Data_info.TEMP1_ERR=selffun::TakeOut_bit(data[6],2);
    QY_BMS_Data_info.TEMP2_ERR=selffun::TakeOut_bit(data[6],3);
    QY_BMS_Data_info.BMS_A_ERR=selffun::TakeOut_bit(data[6],4);
    QY_BMS_Data_info.STOP_TEMP1_Hi=selffun::TakeOut_bit(data[6],5);
    QY_BMS_Data_info.STOP_TEMP1_Li=selffun::TakeOut_bit(data[6],6);
    QY_BMS_Data_info.STOP_TEMP2_Hi=selffun::TakeOut_bit(data[6],7);
    QY_BMS_Data_info.STOP_TEMP2_Li=selffun::TakeOut_bit(data[7],0);
    QY_BMS_Data_info.STOP_BMS_A_Hi=selffun::TakeOut_bit(data[7],1);
    QY_BMS_Data_info.STOP_BMS_A_Li=selffun::TakeOut_bit(data[7],2);
    QY_BMS_Data_info.STOP_V_F_Hi=selffun::TakeOut_bit(data[7],3);
    QY_BMS_Data_info.STOP_V_F_Li=selffun::TakeOut_bit(data[7],4);
    QY_BMS_Data_info.STOP_V_SUM_Hi=selffun::TakeOut_bit(data[7],5);
    QY_BMS_Data_info.STOP_V_SUM_Li=selffun::TakeOut_bit(data[7],6);
    QY_BMS_Data_info.CAN_count_0x1806DAB1=0;
    //EQname::Fault_processing();
}
void QY_BMS_Data::EQ_0x1807DAB1(quint8 data[]) 
{
QY_BMS_Data_info.TEMP1=selffun::com_2uint8(data[1],data[0])*0.1-40;
QY_BMS_Data_info.TEMP2=selffun::com_2uint8(data[3],data[2])*0.1-40;
QY_BMS_Data_info.BMS_A=selffun::com_2uint8(data[5],data[4])*0.1-1000;
QY_BMS_Data_info.V_SUM=selffun::com_2uint8(data[7],data[6])*0.1-1000;
    QY_BMS_Data_info.CAN_count_0x1807DAB1=0;
    //EQname::Fault_processing();
}
void QY_BMS_Data::EQ_0x1808DAB1(quint8 data[]) 
{
    QY_BMS_Data_info.V_MAX=selffun::com_2uint8(data[1],data[0])-5000;
    QY_BMS_Data_info.V_MIN=selffun::com_2uint8(data[3],data[2])-5000;
    QY_BMS_Data_info.V_AVG=selffun::com_2uint8(data[5],data[4])-5000;
    QY_BMS_Data_info.V_VAR=selffun::com_2uint8(data[7],data[6]);
    QY_BMS_Data_info.CAN_count_0x1808DAB1=0;
    //EQname::Fault_processing();
}
void QY_BMS_Data::CAN_loss_rest(int count) 
 {
    QY_BMS_Data_info.CAN_count_0x1801DAB1++;
    QY_BMS_Data_info.CAN_count_0x1802DAB1++;
    QY_BMS_Data_info.CAN_count_0x1803DAB1++;
    QY_BMS_Data_info.CAN_count_0x1804DAB1++;
    QY_BMS_Data_info.CAN_count_0x1805DAB1++;
    QY_BMS_Data_info.CAN_count_0x1806DAB1++;
    QY_BMS_Data_info.CAN_count_0x1807DAB1++;
    QY_BMS_Data_info.CAN_count_0x1808DAB1++;
  if(QY_BMS_Data_info.CAN_count_0x1801DAB1>count) 
    {
        QY_BMS_Data_info.V_F1=0;
        QY_BMS_Data_info.V_F2=0;
        QY_BMS_Data_info.V_F3=0;
        QY_BMS_Data_info.V_F4=0;
    }
  if(QY_BMS_Data_info.CAN_count_0x1802DAB1>count) 
    {
        QY_BMS_Data_info.V_F5=0;
        QY_BMS_Data_info.V_F6=0;
        QY_BMS_Data_info.V_F7=0;
        QY_BMS_Data_info.V_F8=0;
    }
  if(QY_BMS_Data_info.CAN_count_0x1803DAB1>count) 
    {
        QY_BMS_Data_info.V_F9=0;
        QY_BMS_Data_info.V_F10=0;
        QY_BMS_Data_info.V_F11=0;
        QY_BMS_Data_info.V_F12=0;
    }
  if(QY_BMS_Data_info.CAN_count_0x1804DAB1>count) 
    {
        QY_BMS_Data_info.V_F13=0;
        QY_BMS_Data_info.V_F14=0;
        QY_BMS_Data_info.V_F15=0;
        QY_BMS_Data_info.V_F16=0;
    }
  if(QY_BMS_Data_info.CAN_count_0x1805DAB1>count) 
    {
        QY_BMS_Data_info.V_F17=0;
        QY_BMS_Data_info.V_F18=0;
        QY_BMS_Data_info.AD_V=0;
        QY_BMS_Data_info.Power_V1=0;
    }
  if(QY_BMS_Data_info.CAN_count_0x1806DAB1>count) 
    {
        QY_BMS_Data_info.PCB_TEMP=0;
        QY_BMS_Data_info.Channel_NUB=0;
        QY_BMS_Data_info.OC_EN=0;
        QY_BMS_Data_info.DO_OC=0;
    }
  if(QY_BMS_Data_info.CAN_count_0x1807DAB1>count) 
    {
        QY_BMS_Data_info.TEMP1=0;
        QY_BMS_Data_info.TEMP2=0;
        QY_BMS_Data_info.BMS_A=0;
        QY_BMS_Data_info.V_SUM=0;
    }
  if(QY_BMS_Data_info.CAN_count_0x1808DAB1>count) 
    {
        QY_BMS_Data_info.V_MAX=0;
        QY_BMS_Data_info.V_MIN=0;
        QY_BMS_Data_info.V_AVG=0;
        QY_BMS_Data_info.V_VAR=0;
    }
}
void QY_BMS_Data::rest_data_info() 
 {
QY_BMS_Data_info.V_F1=0;
QY_BMS_Data_info.V_F2=0;
QY_BMS_Data_info.V_F3=0;
QY_BMS_Data_info.V_F4=0;
QY_BMS_Data_info.V_F5=0;
QY_BMS_Data_info.V_F6=0;
QY_BMS_Data_info.V_F7=0;
QY_BMS_Data_info.V_F8=0;
QY_BMS_Data_info.V_F9=0;
QY_BMS_Data_info.V_F10=0;
QY_BMS_Data_info.V_F11=0;
QY_BMS_Data_info.V_F12=0;
QY_BMS_Data_info.V_F13=0;
QY_BMS_Data_info.V_F14=0;
QY_BMS_Data_info.V_F15=0;
QY_BMS_Data_info.V_F16=0;
QY_BMS_Data_info.V_F17=0;
QY_BMS_Data_info.V_F18=0;
QY_BMS_Data_info.AD_V=0;
QY_BMS_Data_info.Power_V1=0;
QY_BMS_Data_info.PCB_TEMP=0;
QY_BMS_Data_info.Channel_NUB=0;
QY_BMS_Data_info.OC_EN=0;
QY_BMS_Data_info.DO_OC=0;
QY_BMS_Data_info.Alarm_TEMP1_Hi=0;
QY_BMS_Data_info.Alarm_TEMP1_Li=0;
QY_BMS_Data_info.Alarm_TEMP2_Hi=0;
QY_BMS_Data_info.Alarm_TEMP2_Li=0;
QY_BMS_Data_info.Alarm_BMS_A_Hi=0;
QY_BMS_Data_info.Alarm_BMS_A_Li=0;
QY_BMS_Data_info.Alarm_V_F_Hi=0;
QY_BMS_Data_info.Alarm_V_F_Li=0;
QY_BMS_Data_info.Alarm_V_SUM_Hi=0;
QY_BMS_Data_info.Alarm_V_SUM_Li=0;
QY_BMS_Data_info.Power_V1_ERR=0;
QY_BMS_Data_info.Power_3V_ERR=0;
QY_BMS_Data_info.TEMP1_ERR=0;
QY_BMS_Data_info.TEMP2_ERR=0;
QY_BMS_Data_info.BMS_A_ERR=0;
QY_BMS_Data_info.STOP_TEMP1_Hi=0;
QY_BMS_Data_info.STOP_TEMP1_Li=0;
QY_BMS_Data_info.STOP_TEMP2_Hi=0;
QY_BMS_Data_info.STOP_TEMP2_Li=0;
QY_BMS_Data_info.STOP_BMS_A_Hi=0;
QY_BMS_Data_info.STOP_BMS_A_Li=0;
QY_BMS_Data_info.STOP_V_F_Hi=0;
QY_BMS_Data_info.STOP_V_F_Li=0;
QY_BMS_Data_info.STOP_V_SUM_Hi=0;
QY_BMS_Data_info.STOP_V_SUM_Li=0;
QY_BMS_Data_info.TEMP1=0;
QY_BMS_Data_info.TEMP2=0;
QY_BMS_Data_info.BMS_A=0;
QY_BMS_Data_info.V_SUM=0;
QY_BMS_Data_info.V_MAX=0;
QY_BMS_Data_info.V_MIN=0;
QY_BMS_Data_info.V_AVG=0;
QY_BMS_Data_info.V_VAR=0;
}
void QY_BMS_Data::rest_data_ma() 
 {
}
void QY_BMS_Data::Fault_processing() 
 { 
    if(QY_BMS_Data_info.Alarm_TEMP1_Hi==1)
    {
        int index = QY_BMS_Data_info.FaultList.indexOf("温度1过高报警"); 
        if(index==-1)
        { QY_BMS_Data_info.FaultList<<"温度1过高报警";}
    }
    if(QY_BMS_Data_info.Alarm_TEMP1_Li==1)
    {
        int index = QY_BMS_Data_info.FaultList.indexOf("温度1过低报警"); 
        if(index==-1)
        { QY_BMS_Data_info.FaultList<<"温度1过低报警";}
    }
    if(QY_BMS_Data_info.Alarm_TEMP2_Hi==1)
    {
        int index = QY_BMS_Data_info.FaultList.indexOf("温度2过高报警"); 
        if(index==-1)
        { QY_BMS_Data_info.FaultList<<"温度2过高报警";}
    }
    if(QY_BMS_Data_info.Alarm_TEMP2_Li==1)
    {
        int index = QY_BMS_Data_info.FaultList.indexOf("温度2过低报警"); 
        if(index==-1)
        { QY_BMS_Data_info.FaultList<<"温度2过低报警";}
    }
    if(QY_BMS_Data_info.Alarm_BMS_A_Hi==1)
    {
        int index = QY_BMS_Data_info.FaultList.indexOf("放电电流过高报警"); 
        if(index==-1)
        { QY_BMS_Data_info.FaultList<<"放电电流过高报警";}
    }
    if(QY_BMS_Data_info.Alarm_BMS_A_Li==1)
    {
        int index = QY_BMS_Data_info.FaultList.indexOf("充电电流过高报警"); 
        if(index==-1)
        { QY_BMS_Data_info.FaultList<<"充电电流过高报警";}
    }
    if(QY_BMS_Data_info.Alarm_V_F_Hi==1)
    {
        int index = QY_BMS_Data_info.FaultList.indexOf("单片电池电压过高报警"); 
        if(index==-1)
        { QY_BMS_Data_info.FaultList<<"单片电池电压过高报警";}
    }
    if(QY_BMS_Data_info.Alarm_V_F_Li==1)
    {
        int index = QY_BMS_Data_info.FaultList.indexOf("单片电池电压过低报警"); 
        if(index==-1)
        { QY_BMS_Data_info.FaultList<<"单片电池电压过低报警";}
    }
    if(QY_BMS_Data_info.Alarm_V_SUM_Hi==1)
    {
        int index = QY_BMS_Data_info.FaultList.indexOf("电池总电压过高报警"); 
        if(index==-1)
        { QY_BMS_Data_info.FaultList<<"电池总电压过高报警";}
    }
    if(QY_BMS_Data_info.Alarm_V_SUM_Li==1)
    {
        int index = QY_BMS_Data_info.FaultList.indexOf("电池总电压过低报警"); 
        if(index==-1)
        { QY_BMS_Data_info.FaultList<<"电池总电压过低报警";}
    }
    if(QY_BMS_Data_info.Power_V1_ERR==1)
    {
        int index = QY_BMS_Data_info.FaultList.indexOf("正电源电压故障"); 
        if(index==-1)
        { QY_BMS_Data_info.FaultList<<"正电源电压故障";}
    }
    if(QY_BMS_Data_info.Power_3V_ERR==1)
    {
        int index = QY_BMS_Data_info.FaultList.indexOf("基准电压故障"); 
        if(index==-1)
        { QY_BMS_Data_info.FaultList<<"基准电压故障";}
    }
    if(QY_BMS_Data_info.TEMP1_ERR==1)
    {
        int index = QY_BMS_Data_info.FaultList.indexOf("温度传感器1故障"); 
        if(index==-1)
        { QY_BMS_Data_info.FaultList<<"温度传感器1故障";}
    }
    if(QY_BMS_Data_info.TEMP2_ERR==1)
    {
        int index = QY_BMS_Data_info.FaultList.indexOf("温度传感器2故障"); 
        if(index==-1)
        { QY_BMS_Data_info.FaultList<<"温度传感器2故障";}
    }
    if(QY_BMS_Data_info.BMS_A_ERR==1)
    {
        int index = QY_BMS_Data_info.FaultList.indexOf("电流采集故障"); 
        if(index==-1)
        { QY_BMS_Data_info.FaultList<<"电流采集故障";}
    }
    if(QY_BMS_Data_info.STOP_TEMP1_Hi==1)
    {
        int index = QY_BMS_Data_info.FaultList.indexOf("温度1过高故障"); 
        if(index==-1)
        { QY_BMS_Data_info.FaultList<<"温度1过高故障";}
    }
    if(QY_BMS_Data_info.STOP_TEMP1_Li==1)
    {
        int index = QY_BMS_Data_info.FaultList.indexOf("温度1过低故障"); 
        if(index==-1)
        { QY_BMS_Data_info.FaultList<<"温度1过低故障";}
    }
    if(QY_BMS_Data_info.STOP_TEMP2_Hi==1)
    {
        int index = QY_BMS_Data_info.FaultList.indexOf("温度2过高故障"); 
        if(index==-1)
        { QY_BMS_Data_info.FaultList<<"温度2过高故障";}
    }
    if(QY_BMS_Data_info.STOP_TEMP2_Li==1)
    {
        int index = QY_BMS_Data_info.FaultList.indexOf("温度2过低故障"); 
        if(index==-1)
        { QY_BMS_Data_info.FaultList<<"温度2过低故障";}
    }
    if(QY_BMS_Data_info.STOP_BMS_A_Hi==1)
    {
        int index = QY_BMS_Data_info.FaultList.indexOf("放电电流过高故障"); 
        if(index==-1)
        { QY_BMS_Data_info.FaultList<<"放电电流过高故障";}
    }
    if(QY_BMS_Data_info.STOP_BMS_A_Li==1)
    {
        int index = QY_BMS_Data_info.FaultList.indexOf("充电电流过高故障"); 
        if(index==-1)
        { QY_BMS_Data_info.FaultList<<"充电电流过高故障";}
    }
    if(QY_BMS_Data_info.STOP_V_F_Hi==1)
    {
        int index = QY_BMS_Data_info.FaultList.indexOf("单片电池电压过高故障"); 
        if(index==-1)
        { QY_BMS_Data_info.FaultList<<"单片电池电压过高故障";}
    }
    if(QY_BMS_Data_info.STOP_V_F_Li==1)
    {
        int index = QY_BMS_Data_info.FaultList.indexOf("单片电池电压过低故障"); 
        if(index==-1)
        { QY_BMS_Data_info.FaultList<<"单片电池电压过低故障";}
    }
    if(QY_BMS_Data_info.STOP_V_SUM_Hi==1)
    {
        int index = QY_BMS_Data_info.FaultList.indexOf("电池总电压过高故障"); 
        if(index==-1)
        { QY_BMS_Data_info.FaultList<<"电池总电压过高故障";}
    }
    if(QY_BMS_Data_info.STOP_V_SUM_Li==1)
    {
        int index = QY_BMS_Data_info.FaultList.indexOf("电池总电压过低故障"); 
        if(index==-1)
        { QY_BMS_Data_info.FaultList<<"电池总电压过低故障";}
    }
}
void QY_BMS_Data::EQ_runinfo() 
 {
QY_BMS_Data_mode_info.setHorizontalHeaderLabels(QStringList()<<QStringLiteral("项目")<<QStringLiteral("数值")<<QStringLiteral("单位"));
QY_BMS_Data_mode_info.setItem(0,0,new QStandardItem("电压1"));
QY_BMS_Data_mode_info.setItem(0,1,new QStandardItem(QString::number(QY_BMS_Data_info.V_F1)));
QY_BMS_Data_mode_info.setItem(0,2,new QStandardItem("mV"));
QY_BMS_Data_mode_info.setItem(1,0,new QStandardItem("电压2"));
QY_BMS_Data_mode_info.setItem(1,1,new QStandardItem(QString::number(QY_BMS_Data_info.V_F2)));
QY_BMS_Data_mode_info.setItem(1,2,new QStandardItem("mV"));
QY_BMS_Data_mode_info.setItem(2,0,new QStandardItem("电压3"));
QY_BMS_Data_mode_info.setItem(2,1,new QStandardItem(QString::number(QY_BMS_Data_info.V_F3)));
QY_BMS_Data_mode_info.setItem(2,2,new QStandardItem("mV"));
QY_BMS_Data_mode_info.setItem(3,0,new QStandardItem("电压4"));
QY_BMS_Data_mode_info.setItem(3,1,new QStandardItem(QString::number(QY_BMS_Data_info.V_F4)));
QY_BMS_Data_mode_info.setItem(3,2,new QStandardItem("mV"));
QY_BMS_Data_mode_info.setItem(4,0,new QStandardItem("电压5"));
QY_BMS_Data_mode_info.setItem(4,1,new QStandardItem(QString::number(QY_BMS_Data_info.V_F5)));
QY_BMS_Data_mode_info.setItem(4,2,new QStandardItem("mV"));
QY_BMS_Data_mode_info.setItem(5,0,new QStandardItem("电压6"));
QY_BMS_Data_mode_info.setItem(5,1,new QStandardItem(QString::number(QY_BMS_Data_info.V_F6)));
QY_BMS_Data_mode_info.setItem(5,2,new QStandardItem("mV"));
QY_BMS_Data_mode_info.setItem(6,0,new QStandardItem("电压7"));
QY_BMS_Data_mode_info.setItem(6,1,new QStandardItem(QString::number(QY_BMS_Data_info.V_F7)));
QY_BMS_Data_mode_info.setItem(6,2,new QStandardItem("mV"));
QY_BMS_Data_mode_info.setItem(7,0,new QStandardItem("电压8"));
QY_BMS_Data_mode_info.setItem(7,1,new QStandardItem(QString::number(QY_BMS_Data_info.V_F8)));
QY_BMS_Data_mode_info.setItem(7,2,new QStandardItem("mV"));
QY_BMS_Data_mode_info.setItem(8,0,new QStandardItem("电压9"));
QY_BMS_Data_mode_info.setItem(8,1,new QStandardItem(QString::number(QY_BMS_Data_info.V_F9)));
QY_BMS_Data_mode_info.setItem(8,2,new QStandardItem("mV"));
QY_BMS_Data_mode_info.setItem(9,0,new QStandardItem("电压10"));
QY_BMS_Data_mode_info.setItem(9,1,new QStandardItem(QString::number(QY_BMS_Data_info.V_F10)));
QY_BMS_Data_mode_info.setItem(9,2,new QStandardItem("mV"));
QY_BMS_Data_mode_info.setItem(10,0,new QStandardItem("电压11"));
QY_BMS_Data_mode_info.setItem(10,1,new QStandardItem(QString::number(QY_BMS_Data_info.V_F11)));
QY_BMS_Data_mode_info.setItem(10,2,new QStandardItem("mV"));
QY_BMS_Data_mode_info.setItem(11,0,new QStandardItem("电压12"));
QY_BMS_Data_mode_info.setItem(11,1,new QStandardItem(QString::number(QY_BMS_Data_info.V_F12)));
QY_BMS_Data_mode_info.setItem(11,2,new QStandardItem("mV"));
QY_BMS_Data_mode_info.setItem(12,0,new QStandardItem("电压13"));
QY_BMS_Data_mode_info.setItem(12,1,new QStandardItem(QString::number(QY_BMS_Data_info.V_F13)));
QY_BMS_Data_mode_info.setItem(12,2,new QStandardItem("mV"));
QY_BMS_Data_mode_info.setItem(13,0,new QStandardItem("电压14"));
QY_BMS_Data_mode_info.setItem(13,1,new QStandardItem(QString::number(QY_BMS_Data_info.V_F14)));
QY_BMS_Data_mode_info.setItem(13,2,new QStandardItem("mV"));
QY_BMS_Data_mode_info.setItem(14,0,new QStandardItem("电压15"));
QY_BMS_Data_mode_info.setItem(14,1,new QStandardItem(QString::number(QY_BMS_Data_info.V_F15)));
QY_BMS_Data_mode_info.setItem(14,2,new QStandardItem("mV"));
QY_BMS_Data_mode_info.setItem(15,0,new QStandardItem("电压16"));
QY_BMS_Data_mode_info.setItem(15,1,new QStandardItem(QString::number(QY_BMS_Data_info.V_F16)));
QY_BMS_Data_mode_info.setItem(15,2,new QStandardItem("mV"));
QY_BMS_Data_mode_info.setItem(16,0,new QStandardItem("电压17"));
QY_BMS_Data_mode_info.setItem(16,1,new QStandardItem(QString::number(QY_BMS_Data_info.V_F17)));
QY_BMS_Data_mode_info.setItem(16,2,new QStandardItem("mV"));
QY_BMS_Data_mode_info.setItem(17,0,new QStandardItem("电压18"));
QY_BMS_Data_mode_info.setItem(17,1,new QStandardItem(QString::number(QY_BMS_Data_info.V_F18)));
QY_BMS_Data_mode_info.setItem(17,2,new QStandardItem("mV"));
QY_BMS_Data_mode_info.setItem(18,0,new QStandardItem("模拟采集标准电压"));
QY_BMS_Data_mode_info.setItem(18,1,new QStandardItem(QString::number(QY_BMS_Data_info.AD_V)));
QY_BMS_Data_mode_info.setItem(18,2,new QStandardItem("mV"));
QY_BMS_Data_mode_info.setItem(19,0,new QStandardItem("正电源电压"));
QY_BMS_Data_mode_info.setItem(19,1,new QStandardItem(QString::number(QY_BMS_Data_info.Power_V1)));
QY_BMS_Data_mode_info.setItem(19,2,new QStandardItem("V"));
QY_BMS_Data_mode_info.setItem(20,0,new QStandardItem("PCB温度"));
QY_BMS_Data_mode_info.setItem(20,1,new QStandardItem(QString::number(QY_BMS_Data_info.PCB_TEMP)));
QY_BMS_Data_mode_info.setItem(20,2,new QStandardItem("℃"));
QY_BMS_Data_mode_info.setItem(21,0,new QStandardItem("有效通道数"));
QY_BMS_Data_mode_info.setItem(21,1,new QStandardItem(QString::number(QY_BMS_Data_info.Channel_NUB)));
QY_BMS_Data_mode_info.setItem(21,2,new QStandardItem(""));
QY_BMS_Data_mode_info.setItem(22,0,new QStandardItem("OC使能位"));
QY_BMS_Data_mode_info.setItem(22,1,new QStandardItem(QString::number(QY_BMS_Data_info.OC_EN)));
QY_BMS_Data_mode_info.setItem(22,2,new QStandardItem(""));
QY_BMS_Data_mode_info.setItem(23,0,new QStandardItem("OC选择位"));
QY_BMS_Data_mode_info.setItem(23,1,new QStandardItem(QString::number(QY_BMS_Data_info.DO_OC)));
QY_BMS_Data_mode_info.setItem(23,2,new QStandardItem(""));
QY_BMS_Data_mode_info.setItem(24,0,new QStandardItem("温度1过高报警"));
QY_BMS_Data_mode_info.setItem(24,1,new QStandardItem(QString::number(QY_BMS_Data_info.Alarm_TEMP1_Hi)));
QY_BMS_Data_mode_info.setItem(24,2,new QStandardItem(""));
QY_BMS_Data_mode_info.setItem(25,0,new QStandardItem("温度1过低报警"));
QY_BMS_Data_mode_info.setItem(25,1,new QStandardItem(QString::number(QY_BMS_Data_info.Alarm_TEMP1_Li)));
QY_BMS_Data_mode_info.setItem(25,2,new QStandardItem(""));
QY_BMS_Data_mode_info.setItem(26,0,new QStandardItem("温度2过高报警"));
QY_BMS_Data_mode_info.setItem(26,1,new QStandardItem(QString::number(QY_BMS_Data_info.Alarm_TEMP2_Hi)));
QY_BMS_Data_mode_info.setItem(26,2,new QStandardItem(""));
QY_BMS_Data_mode_info.setItem(27,0,new QStandardItem("温度2过低报警"));
QY_BMS_Data_mode_info.setItem(27,1,new QStandardItem(QString::number(QY_BMS_Data_info.Alarm_TEMP2_Li)));
QY_BMS_Data_mode_info.setItem(27,2,new QStandardItem(""));
QY_BMS_Data_mode_info.setItem(28,0,new QStandardItem("放电电流过高报警"));
QY_BMS_Data_mode_info.setItem(28,1,new QStandardItem(QString::number(QY_BMS_Data_info.Alarm_BMS_A_Hi)));
QY_BMS_Data_mode_info.setItem(28,2,new QStandardItem(""));
QY_BMS_Data_mode_info.setItem(29,0,new QStandardItem("充电电流过高报警"));
QY_BMS_Data_mode_info.setItem(29,1,new QStandardItem(QString::number(QY_BMS_Data_info.Alarm_BMS_A_Li)));
QY_BMS_Data_mode_info.setItem(29,2,new QStandardItem(""));
QY_BMS_Data_mode_info.setItem(30,0,new QStandardItem("单片电池电压过高报警"));
QY_BMS_Data_mode_info.setItem(30,1,new QStandardItem(QString::number(QY_BMS_Data_info.Alarm_V_F_Hi)));
QY_BMS_Data_mode_info.setItem(30,2,new QStandardItem(""));
QY_BMS_Data_mode_info.setItem(31,0,new QStandardItem("单片电池电压过低报警"));
QY_BMS_Data_mode_info.setItem(31,1,new QStandardItem(QString::number(QY_BMS_Data_info.Alarm_V_F_Li)));
QY_BMS_Data_mode_info.setItem(31,2,new QStandardItem(""));
QY_BMS_Data_mode_info.setItem(32,0,new QStandardItem("电池总电压过高报警"));
QY_BMS_Data_mode_info.setItem(32,1,new QStandardItem(QString::number(QY_BMS_Data_info.Alarm_V_SUM_Hi)));
QY_BMS_Data_mode_info.setItem(32,2,new QStandardItem(""));
QY_BMS_Data_mode_info.setItem(33,0,new QStandardItem("电池总电压过低报警"));
QY_BMS_Data_mode_info.setItem(33,1,new QStandardItem(QString::number(QY_BMS_Data_info.Alarm_V_SUM_Li)));
QY_BMS_Data_mode_info.setItem(33,2,new QStandardItem(""));
QY_BMS_Data_mode_info.setItem(34,0,new QStandardItem("正电源电压故障"));
QY_BMS_Data_mode_info.setItem(34,1,new QStandardItem(QString::number(QY_BMS_Data_info.Power_V1_ERR)));
QY_BMS_Data_mode_info.setItem(34,2,new QStandardItem(""));
QY_BMS_Data_mode_info.setItem(35,0,new QStandardItem("基准电压故障"));
QY_BMS_Data_mode_info.setItem(35,1,new QStandardItem(QString::number(QY_BMS_Data_info.Power_3V_ERR)));
QY_BMS_Data_mode_info.setItem(35,2,new QStandardItem(""));
QY_BMS_Data_mode_info.setItem(36,0,new QStandardItem("温度传感器1故障"));
QY_BMS_Data_mode_info.setItem(36,1,new QStandardItem(QString::number(QY_BMS_Data_info.TEMP1_ERR)));
QY_BMS_Data_mode_info.setItem(36,2,new QStandardItem(""));
QY_BMS_Data_mode_info.setItem(37,0,new QStandardItem("温度传感器2故障"));
QY_BMS_Data_mode_info.setItem(37,1,new QStandardItem(QString::number(QY_BMS_Data_info.TEMP2_ERR)));
QY_BMS_Data_mode_info.setItem(37,2,new QStandardItem(""));
QY_BMS_Data_mode_info.setItem(38,0,new QStandardItem("电流采集故障"));
QY_BMS_Data_mode_info.setItem(38,1,new QStandardItem(QString::number(QY_BMS_Data_info.BMS_A_ERR)));
QY_BMS_Data_mode_info.setItem(38,2,new QStandardItem(""));
QY_BMS_Data_mode_info.setItem(39,0,new QStandardItem("温度1过高故障"));
QY_BMS_Data_mode_info.setItem(39,1,new QStandardItem(QString::number(QY_BMS_Data_info.STOP_TEMP1_Hi)));
QY_BMS_Data_mode_info.setItem(39,2,new QStandardItem(""));
QY_BMS_Data_mode_info.setItem(40,0,new QStandardItem("温度1过低故障"));
QY_BMS_Data_mode_info.setItem(40,1,new QStandardItem(QString::number(QY_BMS_Data_info.STOP_TEMP1_Li)));
QY_BMS_Data_mode_info.setItem(40,2,new QStandardItem(""));
QY_BMS_Data_mode_info.setItem(41,0,new QStandardItem("温度2过高故障"));
QY_BMS_Data_mode_info.setItem(41,1,new QStandardItem(QString::number(QY_BMS_Data_info.STOP_TEMP2_Hi)));
QY_BMS_Data_mode_info.setItem(41,2,new QStandardItem(""));
QY_BMS_Data_mode_info.setItem(42,0,new QStandardItem("温度2过低故障"));
QY_BMS_Data_mode_info.setItem(42,1,new QStandardItem(QString::number(QY_BMS_Data_info.STOP_TEMP2_Li)));
QY_BMS_Data_mode_info.setItem(42,2,new QStandardItem(""));
QY_BMS_Data_mode_info.setItem(43,0,new QStandardItem("放电电流过高故障"));
QY_BMS_Data_mode_info.setItem(43,1,new QStandardItem(QString::number(QY_BMS_Data_info.STOP_BMS_A_Hi)));
QY_BMS_Data_mode_info.setItem(43,2,new QStandardItem(""));
QY_BMS_Data_mode_info.setItem(44,0,new QStandardItem("充电电流过高故障"));
QY_BMS_Data_mode_info.setItem(44,1,new QStandardItem(QString::number(QY_BMS_Data_info.STOP_BMS_A_Li)));
QY_BMS_Data_mode_info.setItem(44,2,new QStandardItem(""));
QY_BMS_Data_mode_info.setItem(45,0,new QStandardItem("单片电池电压过高故障"));
QY_BMS_Data_mode_info.setItem(45,1,new QStandardItem(QString::number(QY_BMS_Data_info.STOP_V_F_Hi)));
QY_BMS_Data_mode_info.setItem(45,2,new QStandardItem(""));
QY_BMS_Data_mode_info.setItem(46,0,new QStandardItem("单片电池电压过低故障"));
QY_BMS_Data_mode_info.setItem(46,1,new QStandardItem(QString::number(QY_BMS_Data_info.STOP_V_F_Li)));
QY_BMS_Data_mode_info.setItem(46,2,new QStandardItem(""));
QY_BMS_Data_mode_info.setItem(47,0,new QStandardItem("电池总电压过高故障"));
QY_BMS_Data_mode_info.setItem(47,1,new QStandardItem(QString::number(QY_BMS_Data_info.STOP_V_SUM_Hi)));
QY_BMS_Data_mode_info.setItem(47,2,new QStandardItem(""));
QY_BMS_Data_mode_info.setItem(48,0,new QStandardItem("电池总电压过低故障"));
QY_BMS_Data_mode_info.setItem(48,1,new QStandardItem(QString::number(QY_BMS_Data_info.STOP_V_SUM_Li)));
QY_BMS_Data_mode_info.setItem(48,2,new QStandardItem(""));
QY_BMS_Data_mode_info.setItem(49,0,new QStandardItem("温度1"));
QY_BMS_Data_mode_info.setItem(49,1,new QStandardItem(QString::number(QY_BMS_Data_info.TEMP1)));
QY_BMS_Data_mode_info.setItem(49,2,new QStandardItem("℃"));
QY_BMS_Data_mode_info.setItem(50,0,new QStandardItem("温度2"));
QY_BMS_Data_mode_info.setItem(50,1,new QStandardItem(QString::number(QY_BMS_Data_info.TEMP2)));
QY_BMS_Data_mode_info.setItem(50,2,new QStandardItem("℃"));
QY_BMS_Data_mode_info.setItem(51,0,new QStandardItem("总电流"));
QY_BMS_Data_mode_info.setItem(51,1,new QStandardItem(QString::number(QY_BMS_Data_info.BMS_A)));
QY_BMS_Data_mode_info.setItem(51,2,new QStandardItem("A"));
QY_BMS_Data_mode_info.setItem(52,0,new QStandardItem("总电压"));
QY_BMS_Data_mode_info.setItem(52,1,new QStandardItem(QString::number(QY_BMS_Data_info.V_SUM)));
QY_BMS_Data_mode_info.setItem(52,2,new QStandardItem("V"));
QY_BMS_Data_mode_info.setItem(53,0,new QStandardItem("最大值"));
QY_BMS_Data_mode_info.setItem(53,1,new QStandardItem(QString::number(QY_BMS_Data_info.V_MAX)));
QY_BMS_Data_mode_info.setItem(53,2,new QStandardItem("mV"));
QY_BMS_Data_mode_info.setItem(54,0,new QStandardItem("最小值"));
QY_BMS_Data_mode_info.setItem(54,1,new QStandardItem(QString::number(QY_BMS_Data_info.V_MIN)));
QY_BMS_Data_mode_info.setItem(54,2,new QStandardItem("mV"));
QY_BMS_Data_mode_info.setItem(55,0,new QStandardItem("平均值"));
QY_BMS_Data_mode_info.setItem(55,1,new QStandardItem(QString::number(QY_BMS_Data_info.V_AVG)));
QY_BMS_Data_mode_info.setItem(55,2,new QStandardItem("mV"));
QY_BMS_Data_mode_info.setItem(56,0,new QStandardItem("方差"));
QY_BMS_Data_mode_info.setItem(56,1,new QStandardItem(QString::number(QY_BMS_Data_info.V_VAR)));
QY_BMS_Data_mode_info.setItem(56,2,new QStandardItem("mV²"));
}
